Interpolation method for enlarging an image

ABSTRACT

The present invention relates to an interpolation method for enlarging an image, wherein the image is composed of plural scanning lines. Firstly, it selects four adjacent continuous pixels x k−1 , x k , x k+1 , and x k+2  which have the pixel values f(x k−1 ), f(x k ), f(x k+1 ), and f(x k+2 ) respectively on each of the scanning lines; next, it determines three linear equations L k−1 , L k , and L k+1  according to every two adjacent pixel values f(x k−1 ) and f(x k ), f(x k ) and f(x k+1 ), and f(x k+1 ) and f(x k+2 ), respectively; then, it selects a pixel x to be interpolated between the pixel x k  and the pixel x k+1 ; finally, it applies the pixel x to the three linear equations L k−1 , L k , and L k+1  to determine three candidate pixel values which are weighted and combined to obtain pixel value f(x) of the pixel x.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an image interpolation method and, moreparticularly, to an interpolation method for enlarging an image.

2. Description of Related Art

In an image process to enlarge an image, the image of low-pixel has tobe enlarged as an image of high-pixel. The image will become indistinctbecause of loss to the image information. Moreover, this indistinctimage reduces the quality of image. In order to avoid this problem, whenthe image is proceeding to enlarge, a microprocessor uses aninterpolation method, such as B-spline or Bicubic, for interpolatingpixels to the image to be enlarged, so as to obtain new pixel values toachieve good vision quality. However, the interpolation operation uses acomplex cubic polynomial for calculating interpolated pixels. Thus, whenproceeding to enlarge for the image, lots of multipliers and adders arerequired to implement the interpolation operation. Accordingly, such agrate amount of operation not only is disadvantageous for hardwareimplementation but also spends a lot of computation time. Therefore, itis desirable to provide an improved interpolation method for enlargingan image to mitigate and/or obviate the aforementioned problems.

SUMMARY OF THE INVENTION

The object of the present invention is to provide an interpolationmethod for enlarging an image, which uses a linear interpolation forobtaining interpolated pixel values so as to significantly reduce theamount of computation, thereby being advantageous to hardwareimplementation and reducing the cost.

To achieve the object, the present invention provides an interpolationmethod for enlarging an image, wherein the image is composed of pluralscanning lines. The method comprises the steps of: (A) selecting fouradjacent continuous pixels x_(k−1), x_(k), x_(k+1), and x_(k+2) whichhave the pixel values f(x_(k−1)), f(x_(k)), f(x_(k+1)), and f(x_(k+2)),respectively, on each of the scanning lines; (B) determining threelinear equations L_(k−1), L_(k), and L_(k+1) according to every twoadjacent pixel values f(x_(k−1)) and f(x_(k)), f(x_(k)) and f(x_(k+1)),and f(x_(k+1)) and f(x_(k+2)), respectively; (C) selecting a pixel x tobe interpolated between the pixel x_(k) and the pixel x_(k+1); (D)applying the pixel x to the three linear equations L_(k−1), L_(k), andL_(k+1) to determine three candidate pixel values, respectively, whichare weighted and combined to obtain pixel value f(x) of the pixel x.

Other objects, advantages, and novel features of the invention willbecome more apparent from the following detailed description when takenin conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart of interpolation for enlarging an image inaccordance with the present invention;

FIG. 2 is a schematic view of an image; and

FIG. 3 is a schematic diagram of interpolation for enlarging an image inaccordance with the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

The present invention is an interpolation method for enlarging an image.The steps of the method are shown in FIG. 1. The method of theembodiment will be elaborated in FIG. 2 and FIG. 3.

With reference to FIG. 2, there is shown a schematic diagram of animage, wherein the image is composed of plural scanning lines 21. Eachof the scanning lines 21 also includes plural pixels x₁˜x_(n). Each ofthe pixels x₁˜x_(n) has a pixel value. When proceeding to enlarge theimage, a microprocessor inserts the interpolated pixels among the pixelsx₁˜x_(n) of each scanning line 21 for increasing the number of pixels ofthe image to achieve effect of enlargement.

Please refer to FIGS. 1 and 3. FIG. 1 shows a flowchart of interpolationmethod for enlarging an image in accordance with the present invention,and FIG. 3 shows a schematic diagram of the interpolation method forenlarging an image in accordance with the present invention. Firstly, itselects four adjacent continuous pixels x_(k−1), x_(k), x_(k+1), andx_(k+2) which have the pixel values f(x_(k−1)), f(x_(k)), f(x_(k+1)),and f(x_(k+2)), respectively, on each of the scanning lines 21 (step A).Next, it determines three linear equations L_(k−1), L_(k), and L_(k+1)according to every two adjacent pixel values f(x_(k−1)) and f(x_(k)),f(x_(k)) and f(x_(k+1)), and f(x_(k+1)) and f(x_(k+2)), respectively.Moreover, it computes three slopes, denoted as slope 1, slope 2, andslope 3, for the three linear equations L_(k−1), L_(k), and L_(k+1),respectively (step B).

Then, it selects a pixel x to be interpolated between the pixel x_(k)and the pixel x_(k+1), wherein the ratio of a distance from the pixelx_(k) to the pixel x to a distance from the pixel (x_(k)) to the pixel(x_(k+1)) is s. The ratio of a distance from the pixel x to the pixelx_(k+ to a distance from the pixel x) _(k) to the pixel x_(k+1) is 1−s(step C). Finally, it applies the pixel x to the three linear equationsL_(k−1), L_(k), and L_(k+1) to determine three candidate pixel valuesf1, f2 and f3 as follows:f1=slope1×(1−s)+f(x _(k−1)),f2=slope2×(1−s)+f(x _(k)), andf3=f(x _(k+1))−slope3×s.These three candidate pixel values f1, f2 and f3 are then weighted byweighting values w1, w2, and w3, respectively, and combined to obtain apixel value f(x) of the pixel (x) (step D) as follows:f(x)=w1×[slope1×(1−s)+f(x _(k−1))]+w2×[slope2×(1−s)+f(x _(k))]+w3×[f(x_(k+1))−slope3×s],where w1=s/2, w2=½, w3=(1−s)/2, w1+w2+w3=1.

Thus, according to the above steps, it is able to proceed to interpolateand compute the pixel values of the interpolation for the pixel valueson each of scanning line. When proceeding to enlarge the image, thosepixel values of new interpolation avoid producing an indistinct imagethereby maintaining the quality of image. The interpolation method ofthe present invention uses a simple linear equation for obtaininginterpolated pixel values so as to significantly reduce the amount ofcomputation, thereby being advantageous to hardware implementation andreducing the cost.

Although the present invention has been explained in relation to itspreferred embodiment, it is to be understood that many other possiblemodifications and variations can be made without departing from thescope of the invention as hereinafter claimed.

1. An interpolation method for enlarging an image, wherein the image iscomposed of plural scanning lines, the method comprising the steps of:(A) selecting four adjacent continuous pixels x_(k−1), x_(k), x_(k+1),and x_(k+2) which have the pixel values f(x_(k−1)), f(x_(k)),f(x_(k+1)), and f(x_(k+2)) respectively on each of the scanning lines;(B) determining three linear equations L_(k−1), L_(k), and L_(k+1)according to every two adjacent pixel values f(x_(k−1)) and f(x_(k)),f(x_(k)) and f(x_(k+1)), and f(x_(k+1)) and f(x_(k+) ₂), respectively;(C) selecting a pixel x to be interpolated between the pixel x_(k) andthe pixel x_(k+1); and (D) applying the pixel x to the three linearequations L_(k−1), L_(k), and L_(k+1) to determine three candidate pixelvalues, respectively, which are weighted and combined to obtain a pixelvalue f(x) of the pixel x.
 2. The method as claimed in claim 1, whereinthe pixel value f(x) of the pixel x isf(x)=w1×[slope1×(1−s)+f(x_(k−1))]+w2×[slope2×(1−s)+f(x_(k))]+w3×[f(x_(k+1))−slope3×s],where slope1, slope2, and slope3 are slopes of the linear equationsL_(k−1), L_(k), and L_(k+1), respectively, s is a ratio of a distancefrom the pixel x_(k) to the pixel x to a distance from the pixel x_(k)to the pixel x_(k+1), 1−s is a ratio of a distance from the pixel x tothe pixel x_(k+1) to a distance from the pixel x_(k) to the pixelx_(k+1), and w1, w2, and w3 are the weighting values.
 3. The method asclaimed in claim 2, wherein the sum of weighting values w1+w2+w3 is 1.4. The method as claimed in claim 3, wherein the weighting values w1,w2, and w3 are s/2, ½, and (1−s)/2, respectively.